<template>
  <div style="margin-top: 30px">
    <el-form ref="form"  label-width="110px">
      <el-row>
        <el-col :span="8">

          <el-form-item label="申请编号" style="font-weight: 700">
            <span>{{form.applyCode}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="申请日期" style="font-weight: 700">
            <span>{{form.applyDate}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="申请人姓名" style="font-weight: 700">
            <span>{{form.applyName}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8" style="margin-top: 10px">
          <el-form-item label="性别" style="font-weight: 700">
            <span> {{sys_user_sex.find(item=>item.value==form.sex)? sys_user_sex.find(item=>item.value==form.sex).label:''}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8" style="margin-top: 10px">
          <el-form-item label="出生日期" style="font-weight: 700">
            <span>{{form.birthDate}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8" style="margin-top: 10px">
          <el-form-item label="身份证号" style="font-weight: 700">
            <span>{{form.idCard}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8" style="margin-top: 10px">
          <el-form-item label="年龄" style="font-weight: 700">
            <span>{{form.age}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8" style="margin-top: 10px">
          <el-form-item label="联系电话" style="font-weight: 700">
            <span>{{form.telephone}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8" style="margin-top: 10px">
          <el-form-item label="居住状况" style="font-weight: 700">
            <span> {{living_conditions.find(item=>item.value==form.livingConditions)? living_conditions.find(item=>item.value==form.livingConditions).label:''}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="24" style="margin-top: 10px">
          <el-form-item label="家庭住址" style="font-weight: 700">
            <span>{{form.livingAddrProvinceName}}{{form.livingAddrCityName}}{{form.livingAddrCountyName}}{{form.livingAddrStreetName}}{{form.livingAddrCommunityName}}{{form.livingAddrStreetName}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8" style="margin-top: 10px">
          <el-form-item label="代理人姓名" style="font-weight: 700">
            <span>{{form.agentName}}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8" style="margin-top: 10px">
          <el-form-item label="代理人电话" style="font-weight: 700">
            <span>{{form.agentTelephone}}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row style="margin-top: 10px">
        <el-col :span="8">
          <el-form-item label="身份证正面照" style="font-weight: 700">
            <el-image
              style="width: 200px; height: 130px"
              :src="form.positiveUrl"
              :zoom-rate="1.2"
              :max-scale="7"
              :min-scale="0.2"
              :preview-src-list="[form.positiveUrl]"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="身份证反面照" style="font-weight: 700">
            <el-image
              style="width: 200px; height: 130px"
              :src="form.negativeUrl"
              :zoom-rate="1.2"
              :max-scale="7"
              :min-scale="0.2"
              :preview-src-list="[form.negativeUrl]"
            />
          </el-form-item>
        </el-col>
        <el-col :span="24" style="margin-top: 10px">
          <el-form-item>
            <template #label>
              <div
                class="custom-label"
                style="line-height: 18px; font-weight: 700"
              >
                户口本内页 （自己那页）
              </div>
            </template>
            <div>
              <el-image
                style="width: 200px; height: 130px"
                :src="form.householdRegisterUrl"
                :zoom-rate="1.2"
                :max-scale="7"
                :min-scale="0.2"
                :preview-src-list="[form.householdRegisterUrl]"
              />
            </div>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script setup name="setp1">
import { homeBedApplyInfo } from "@/api/homebedsign";

const { applyId } = defineProps(["applyId"]);

const { proxy } = getCurrentInstance();
const {  sys_user_sex,living_conditions} = proxy.useDict(
    "sys_user_sex",
    "living_conditions"
);
const data = reactive({
  form: {},
});

const { form } = toRefs(data);
function getinfo() {
  console.log('3244444',applyId)
  homeBedApplyInfo(applyId).then((res) => {
    console.log(res.homeBedApply);
    form.value=res.homeBedApply
    console.log('3243243442323',form.value)


  });
}
getinfo();

/** 提交按钮 */
</script>

<style scoped lang="scss"></style>
